package com.adgox.tiantianbiting.net;

import android.content.BroadcastReceiver;
import android.content.Context;
import android.content.Intent;
import android.os.Bundle;

import com.adgox.tiantianbiting.main.MainActivity;
import com.adgox.tiantianbiting.main.StartActivity;

import cn.jpush.android.api.JPushInterface;

/**
 * Created by tang on 2019/3/25.
 */

public class JpushReceiver extends BroadcastReceiver {
    public JpushReceiver() {
    }

    @Override
    public void onReceive(Context context, Intent intent) {
        Bundle bundle = intent.getExtras();
        if (JPushInterface.ACTION_NOTIFICATION_OPENED.equals(intent.getAction())){
            context.startActivity(new Intent(context, MainActivity.class));
        }
    }
}
